/*
* Copyright (c) 2016 . All Rights Reserved.
*/
package com.cgmnx.admin.web.controller;

import com.cgmnx.admin.common.bean.ApiRes;
import com.cgmnx.admin.model.enums.ReplyAuditStatus;
import com.google.common.base.Function;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.apache.commons.collections.MapUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;
import java.util.Map;

/**
 * @author: created  Date: 16/12/25 Time: 下午2:41
 * @version: 1.0
 */
@RestController
public class ReplyUiController extends BaseAdminController {
    /**
     * 后台首页
     * @return
     */
    @ApiOperation(value = "后台首页")
    @RequestMapping(value = "/reply/index.html", method = RequestMethod.GET)
    public ModelAndView index() {
        ModelAndView modelAndView = new ModelAndView("/reply/index");

        modelAndView.addObject("replyAuditStatus", getReplyAuditStatusMap());
        return modelAndView;
    }

    private List<Map<String, Object>> getReplyAuditStatusMap() {

        List<Map<String, Object>> list = Lists.newArrayList();
//        for(ReplyAuditStatus value : ReplyAuditStatus.values()) {
//            Map<String,Object> map = Maps.newHashMap();
//            map.put("code",value.getCode());
//            map.put("desc",value.getDesc());
//            list.add(map);
//        }
        return list;
    }
}